Hi Bengt,
We did something similar for a Spindle with a Gear shift under Mach3. I tried to modify it for your case and uploaded it to your folder:
SpindleMach3PWMHiLoGear.c
You will need to modify it for your low and high speed ranges. It uses just one Pulley in Mach3 which should be set for your max Hi speed RPM. As you send different speeds (S commands) the C program will decide which speed range and direction to use. If that is what is already commanded it will just quickly change the speed. But if the direction or speed range changes then it will stop everything, delay, switch, delay, then command the new speed. You will need to change the RPM values in the C Program for your system. Mach3 sends the speed to the Plugin as a "relative pulley speed". So for example if the pulley speed in Mach3 is set as 1000 RPM and an S750 is commanded, the plugin will receive a relative pulley speed of 0.75.
HTH
TK
| Group: DynoMotion |
Message: 4679 |
From: Bengt Sjoelund |
Date: 4/27/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
Thank you very much, will try to get things with the spindle fixed this weekend so I will report back.
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> We did something similar for a Spindle with a Gear shift under Mach3. I tried to modify it for your case and uploaded it to your folder:
> Â
> SpindleMach3PWMHiLoGear.c
> Â
> You will need to modify it for your low and high speed ranges. It uses just one Pulley in Mach3 which should be set for your max Hi speed RPM. As you send different speeds (S commands) the C program will decide which speed range and direction to use. If that is what is already commanded it will just quickly change the speed. But if the direction or speed range changes then it will stop everything, delay, switch, delay, then command the new speed. You will need to change the RPM values in the C Program for your system. Mach3 sends the speed to the Plugin as a "relative pulley speed". So for example if the pulley speed in Mach3 is set as 1000 RPM and an S750 is commanded, the plugin will receive a relative pulley speed of 0.75.
> Â
> HTH
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, April 26, 2012 1:43 PM
> Subject: [DynoMotion] More I/O questions
>
>
> Â
> Hi,
>
> How can this be done in SpindleMach3PWM.c
> I have 2-speed 3-phase spindle motor controlled via contactors
> M3 = 152
> M4 = 153
> M3HS = 154
>
> PWM out from IO26 to control the VFD
>
> So, can this be dealt with via Mach's PULLEYS? Or do I just settle for using Bit 154 and make do with what I can get. Max rpm with no VFD control is 2500rpm, maybe I can get a bit more with VFD.
>
> I have downloaded pdf file of my IO plan in my folder IO List 3-4.pdf
>
> Looking forward to your comments
> Cheers
> Bengt
>
> case EX_SPINON:
> if (Direction==0) // LOW SPEED
> {
> printf("Spindle CW ON\n");
> SetBit(152);
> ClearBit(153);
> }
> >>>>>> ??? if (Direction==0) // HIGH SPEED
> {
> printf("Spindle CW ON\n");
> SetBit(154);
> ClearBit(153);
> ClearBit(152);
> }
> else if (Direction==1)
> {
> printf("Spindle CCW ON\n");
> ClearBit(152);
> ClearBit(154);
> SetBit(153);
> }
> break;
>
|
|
| Group: DynoMotion |
Message: 4681 |
From: Bengt Sjoelund |
Date: 4/27/2012 |
| Subject: Re: More I/O questions |
|
Hi Tom,
Question, how is the encoder with A/B/Z on IO36/37/38 involved in the loop for spindle speed feedback? Will there be a separate .c file for this?
Cheers
Bengt
|
|
| Group: DynoMotion |
Message: 4682 |
From: Bengt Sjoelund |
Date: 4/27/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
How can the encoder be integrated? IO36/37/38 I assume some kind of feedback is needed for spindle speed and rigid tapping. Another ?.c file for this purpose?
Cheers
Bengt
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> > Â
> > We did something similar for a Spindle with a Gear shift under Mach3. I tried to modify it for your case and uploaded it to your folder:
> > Â
> > SpindleMach3PWMHiLoGear.c
> > Â
> > You will need to modify it for your low and high speed ranges. It uses just one Pulley in Mach3 which should be set for your max Hi speed RPM. As you send different speeds (S commands) the C program will decide which speed range and direction to use. If that is what is already commanded it will just quickly change the speed. But if the direction or speed range changes then it will stop everything, delay, switch, delay, then command the new speed. You will need to change the RPM values in the C Program for your system. Mach3 sends the speed to the Plugin as a "relative pulley speed". So for example if the pulley speed in Mach3 is set as 1000 RPM and an S750 is commanded, the plugin will receive a relative pulley speed of 0.75.
> > Â
> > HTH
> > TK
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, April 26, 2012 1:43 PM
> > Subject: [DynoMotion] More I/O questions
> >
> >
> > Â
> > Hi,
> >
> > How can this be done in SpindleMach3PWM.c
> > I have 2-speed 3-phase spindle motor controlled via contactors
> > M3 = 152
> > M4 = 153
> > M3HS = 154
> >
> > PWM out from IO26 to control the VFD
> >
> > So, can this be dealt with via Mach's PULLEYS? Or do I just settle for using Bit 154 and make do with what I can get. Max rpm with no VFD control is 2500rpm, maybe I can get a bit more with VFD.
> >
> > I have downloaded pdf file of my IO plan in my folder IO List 3-4.pdf
> >
> > Looking forward to your comments
> > Cheers
> > Bengt
> >
> > case EX_SPINON:
> > if (Direction==0) // LOW SPEED
> > {
> > printf("Spindle CW ON\n");
> > SetBit(152);
> > ClearBit(153);
> > }
> > >>>>>> ??? if (Direction==0) // HIGH SPEED
> > {
> > printf("Spindle CW ON\n");
> > SetBit(154);
> > ClearBit(153);
> > ClearBit(152);
> > }
> > else if (Direction==1)
> > {
> > printf("Spindle CCW ON\n");
> > ClearBit(152);
> > ClearBit(154);
> > SetBit(153);
> > }
> > break;
> >
>
|
|
| Group: DynoMotion |
Message: 4683 |
From: Tom Kerekes |
Date: 4/27/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
There isn't any need for a .c file. IO36 and IO37 are connected to Encoder Input Channel 4. You must configure an axis as Input Mode Encoder and set InputChan0 to 4. The axis doesn't need to be enabled for it to count encoder counts. You should then see the spindle counts on the Axis Screen count as the spindle rotates. You probably won't need the index pulse on the spindle (some users have a hard time understanding this, but because we have an encoder we can tell by counting when we have made a complete revolution).
But actually what are you trying to do? Your system is a Mill not a Lathe, correct? Are you trying to thread? Or rigid tap?
Regards
TK
| Group: DynoMotion |
Message: 4684 |
From: Tom Kerekes |
Date: 4/28/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
I think our posts are crossing...
I understand now you want to rigid tap. As far as I know the other Users all had a servo driving the spindle so it was relatively easy to command the spindle axis to rotate so many revolutions using controlled acceleration, then reverse back to some point and so forth. To rigid tap, the amount and speed of spindle motion is not critical as we will be monitoring the result and tracking the z motion to however it behaves, but it of course has to be reasonable and not overshoot too many revolutions such that it would bottom out the tap into a drilled hole for example.
I'm thinking that the best approach is to setup your spindle just like a servo axis with PWM for output and Encoder for feedback. The SpindleMach3PWMHiLoGear.c program that I setup for you before was just operating in an open loop manner. The idea was to just calculate what fixed PWM value should give the correct RPM. But since you will now have feedback a better approach would be to set it up like a servo. That will provide two benefits: #1 If you command a certain speed, the encoder feedback will be used to adjust the output to hold that speed exactly. #2 for rigid tapping it will be easy to command the spindle to move so far and reverse.
So if you agree, let's configure an axis to control your Spindle. Sorry I didn't think this though properly from the beginning. Did that SpindleMach3PWMHiLoGear.c program work?
Unfortunately KFLOP doesn't support Axis Output Mode of PWM type directly. You must add a C small loop to your Init.c to write the Servo Axis Output to a PWM.
Have I lost you? :}
First step is to get the Axis reading the encoder. Can you do this?
Regards
TK
| Group: DynoMotion |
Message: 4685 |
From: Bengt Sjoelund |
Date: 4/28/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
Well here is one user have a hard time understanding ;)
Yes it is a Mill, want to have the possibilty to do threading with singlepoint - multipoint as well as ridgid tapping.
So can this be done without index pulse?
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> There isn't any need for a .c file. IO36 and IO37 are connected to Encoder Input Channel 4. You must configure an axis as Input Mode Encoder and set InputChan0 to 4. The axis doesn't need to be enabled for it to count encoder counts.  You should then see the spindle counts on the Axis Screen count as the spindle rotates. You probably won't need the index pulse on the spindle (some users have a hard time understanding this, but because we have an encoder we can tell by counting when we have made a complete revolution).Â
> Â
> But actually what are you trying to do? Your system is a Mill not a Lathe, correct? Are you trying to thread? Or rigid tap?
> Â
> Regards
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, April 27, 2012 9:37 AM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
>
> Question, how is the encoder with A/B/Z on IO36/37/38 involved in the loop for spindle speed feedback? Will there be a separate .c file for this?
> Cheers
> Bengt
>
|
|
| Group: DynoMotion |
Message: 4686 |
From: Bengt Sjoelund |
Date: 4/28/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
Lost me? In a way yes ;)
Have not yet got so far with the spindle, just now manual.
Will try to hook up my encoder today, need to get signal levels sorted out. Going to drive with 12VDC so I need to get signals to 5VDC, this we have discussed before. (encoder is 9-36V with high level TTL output)
So if I get you right I have to setup the spindle axis as servo.
PWM (26.1) to 0-10V (small loop in C within init.c) to the VFD (3-phase motor) with encoder feedback A/B/Z.
_______________________________________________________
Just to let you know further plans for my Mill:
1. A-axis driven by AC-servo + function as a spindle
(on milling table horizontal, so it will be functioning as a mini lathe in spindle mode with toolholder on regular spindle head)
2. HighSpeed Spindle 0-10V controlled (400W 54.000rpm)
(to be mounted on regular spindle head with vertical/horizontal positioning fixture)
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> I think our posts are crossing...
> Â
> I understand now you want to rigid tap. As far as I know the other Users all had a servo driving the spindle so it was relatively easy to command the spindle axis to rotate so many revolutions using controlled acceleration, then reverse back to some point and so forth. To rigid tap, the amount and speed of spindle motion is not critical as we will be monitoring the result and tracking the z motion to however it behaves, but it of course has to be reasonable and not overshoot too many revolutions such that it would bottom out the tap into a drilled hole for example.Â
> Â
> I'm thinking that the best approach is to setup your spindle just like a servo axis with PWM for output and Encoder for feedback. The SpindleMach3PWMHiLoGear.c program that I setup for you before was just operating in an open loop manner. The idea was to just calculate what fixed PWM value should give the correct RPM. But since you will now have feedback a better approach would be to set it up like a servo. That will provide two benefits: #1 If you command a certain speed, the encoder feedback will be used to adjust the output to hold that speed exactly. #2 for rigid tapping it will be easy to command the spindle to move so far and reverse.
> Â
> So if you agree, let's configure an axis to control your Spindle. Sorry I didn't think this though properly from the beginning. Did that SpindleMach3PWMHiLoGear.c program work?
> Â
> Unfortunately KFLOP doesn't support Axis Output Mode of PWM type directly. You must add a C small loop to your Init.c to write the Servo Axis Output to a PWM.Â
> Â
> Have I lost you? :}
> Â
> First step is to get the Axis reading the encoder. Can you do this?
> Â
> Regards
> TK
> Â
> Â
> Â
> Â
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, April 27, 2012 9:58 AM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
> How can the encoder be integrated? IO36/37/38 I assume some kind of feedback is needed for spindle speed and rigid tapping. Another ?.c file for this purpose?
> Cheers
> Bengt
>
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > > ÃÂ
> > > We did something similar for a Spindle with a Gear shift under Mach3.ÃÂ I tried to modify it for your case and uploaded it to your folder:
> > > ÃÂ
> > > SpindleMach3PWMHiLoGear.c
> > > ÃÂ
> > > You will need to modify it for your low and high speed ranges.ÃÂ It uses just one Pulley in Mach3 which should be set for your max Hi speed RPM.ÃÂ As you send different speeds (S commands) the C program will decide which speed range and direction to use.ÃÂ If that is what is already commanded it will just quickly change the speed.ÃÂ But if the direction or speed range changes then it will stop everything, delay, switch, delay,ÃÂ then command the new speed.ÃÂ You will need to change the RPM values in the C Program for your system.ÃÂ Mach3 sends the speed to the Plugin as a "relative pulley speed".ÃÂ So for example if the pulley speed in Mach3 is set as 1000 RPM and an S750 is commanded, the plugin will receive a relative pulley speed of 0.75.
> > > ÃÂ
> > > HTH
> > > TK
> > >
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, April 26, 2012 1:43 PM
> > > Subject: [DynoMotion] More I/O questions
> > >
> > >
> > > ÃÂ
> > > Hi,
> > >
> > > How can this be done in SpindleMach3PWM.c
> > > I have 2-speed 3-phase spindle motor controlled via contactors
> > > M3 = 152
> > > M4 = 153
> > > M3HS = 154
> > >
> > > PWM out from IO26 to control the VFD
> > >
> > > So, can this be dealt with via Mach's PULLEYS? Or do I just settle for using Bit 154 and make do with what I can get. Max rpm with no VFD control is 2500rpm, maybe I can get a bit more with VFD.
> > >
> > > I have downloaded pdf file of my IO plan in my folder IO List 3-4.pdf
> > >
> > > Looking forward to your comments
> > > Cheers
> > > Bengt
> > >
> > > case EX_SPINON:
> > > if (Direction==0) // LOW SPEED
> > > {
> > > printf("Spindle CW ON\n");
> > > SetBit(152);
> > > ClearBit(153);
> > > }
> > > >>>>>> ??? if (Direction==0) // HIGH SPEED
> > > {
> > > printf("Spindle CW ON\n");
> > > SetBit(154);
> > > ClearBit(153);
> > > ClearBit(152);
> > > }
> > > else if (Direction==1)
> > > {
> > > printf("Spindle CCW ON\n");
> > > ClearBit(152);
> > > ClearBit(154);
> > > SetBit(153);
> > > }
> > > break;
> > >
> >
>
|
|
| Group: DynoMotion |
Message: 4689 |
From: Tom Kerekes |
Date: 4/28/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
Yes.
We had a discussion about this here:
TK
| Group: DynoMotion |
Message: 4692 |
From: Bengt Sjoelund |
Date: 4/29/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
Now I have the encoder working, axis #4 is counting up and down.
Have the SpindleMach3PWMHiLoGear.c program working *** but I am missing the Foreward and Reverse commands to the VFD. What do you say about Bit158 and 159 for this purpose as they are free in my IO list.
*** I can use M3 and M4 when controlling manually from the remote panel but I could not get HI to work. You have set some values to <700/4000 = what exactly does this do?
So far so good
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> I think our posts are crossing...
> Â
> I understand now you want to rigid tap. As far as I know the other Users all had a servo driving the spindle so it was relatively easy to command the spindle axis to rotate so many revolutions using controlled acceleration, then reverse back to some point and so forth. To rigid tap, the amount and speed of spindle motion is not critical as we will be monitoring the result and tracking the z motion to however it behaves, but it of course has to be reasonable and not overshoot too many revolutions such that it would bottom out the tap into a drilled hole for example.Â
> Â
> I'm thinking that the best approach is to setup your spindle just like a servo axis with PWM for output and Encoder for feedback. The SpindleMach3PWMHiLoGear.c program that I setup for you before was just operating in an open loop manner. The idea was to just calculate what fixed PWM value should give the correct RPM. But since you will now have feedback a better approach would be to set it up like a servo. That will provide two benefits: #1 If you command a certain speed, the encoder feedback will be used to adjust the output to hold that speed exactly. #2 for rigid tapping it will be easy to command the spindle to move so far and reverse.
> Â
> So if you agree, let's configure an axis to control your Spindle. Sorry I didn't think this though properly from the beginning. Did that SpindleMach3PWMHiLoGear.c program work?
> Â
> Unfortunately KFLOP doesn't support Axis Output Mode of PWM type directly. You must add a C small loop to your Init.c to write the Servo Axis Output to a PWM.Â
> Â
> Have I lost you? :}
> Â
> First step is to get the Axis reading the encoder. Can you do this?
> Â
> Regards
> TK
> Â
> Â
> Â
> Â
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, April 27, 2012 9:58 AM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
> How can the encoder be integrated? IO36/37/38 I assume some kind of feedback is needed for spindle speed and rigid tapping. Another ?.c file for this purpose?
> Cheers
> Bengt
>
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > > ÃÂ
> > > We did something similar for a Spindle with a Gear shift under Mach3.ÃÂ I tried to modify it for your case and uploaded it to your folder:
> > > ÃÂ
> > > SpindleMach3PWMHiLoGear.c
> > > ÃÂ
> > > You will need to modify it for your low and high speed ranges.ÃÂ It uses just one Pulley in Mach3 which should be set for your max Hi speed RPM.ÃÂ As you send different speeds (S commands) the C program will decide which speed range and direction to use.ÃÂ If that is what is already commanded it will just quickly change the speed.ÃÂ But if the direction or speed range changes then it will stop everything, delay, switch, delay,ÃÂ then command the new speed.ÃÂ You will need to change the RPM values in the C Program for your system.ÃÂ Mach3 sends the speed to the Plugin as a "relative pulley speed".ÃÂ So for example if the pulley speed in Mach3 is set as 1000 RPM and an S750 is commanded, the plugin will receive a relative pulley speed of 0.75.
> > > ÃÂ
> > > HTH
> > > TK
> > >
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, April 26, 2012 1:43 PM
> > > Subject: [DynoMotion] More I/O questions
> > >
> > >
> > > ÃÂ
> > > Hi,
> > >
> > > How can this be done in SpindleMach3PWM.c
> > > I have 2-speed 3-phase spindle motor controlled via contactors
> > > M3 = 152
> > > M4 = 153
> > > M3HS = 154
> > >
> > > PWM out from IO26 to control the VFD
> > >
> > > So, can this be dealt with via Mach's PULLEYS? Or do I just settle for using Bit 154 and make do with what I can get. Max rpm with no VFD control is 2500rpm, maybe I can get a bit more with VFD.
> > >
> > > I have downloaded pdf file of my IO plan in my folder IO List 3-4.pdf
> > >
> > > Looking forward to your comments
> > > Cheers
> > > Bengt
> > >
> > > case EX_SPINON:
> > > if (Direction==0) // LOW SPEED
> > > {
> > > printf("Spindle CW ON\n");
> > > SetBit(152);
> > > ClearBit(153);
> > > }
> > > >>>>>> ??? if (Direction==0) // HIGH SPEED
> > > {
> > > printf("Spindle CW ON\n");
> > > SetBit(154);
> > > ClearBit(153);
> > > ClearBit(152);
> > > }
> > > else if (Direction==1)
> > > {
> > > printf("Spindle CCW ON\n");
> > > ClearBit(152);
> > > ClearBit(154);
> > > SetBit(153);
> > > }
> > > break;
> > >
> >
>
|
|
| Group: DynoMotion |
Message: 4695 |
From: Tom Kerekes |
Date: 4/29/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
That is good. Bits 158 and 158 should work. Yes the 700/4000 was used as the low high speed RPM values. Change them to correspond the the Max Low Speed and Max Hi Speed values for your system. You will also need to change the Factor value for the speed difference between High and Low Speeds.
Do you know what limitations there are for switching directions and Hi/Low ranges? Will it cause any damage to switch them rapidly back and forth when we try to servo to a certain speed or position? If so we will have to build in some protections into the C Code. Maybe something like once we decide to switch directions or speeds we will prevent switching back for some amount of time.
Regards
TK
| Group: DynoMotion |
Message: 4698 |
From: Bengt Sjoelund |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
Will do the cabling now from JP8 /Bits 158/159.
How are these set, activated in Mach3 or within the HiLo C file?
I have uploaded a picture showing the spindel head gerabox, this is from the time before VFD when all rpm's where manually set. As you can see I have crossed over one manual setting so the lever is always in outer position as the encoder is mounted on that shaft. This was the easiest way to get 1:1. Also there is a manual gearing setting via A to E that will be more or less locked to A for max rpm's on HI/LO motor setting.
LO max rpm is 1250 but I think that 700 rpm is a suitable max and let the HI take it from there to max 2500. This is where I want to start even if I can get more than 2500 via VFD but I think it is wise not to push the mechanical gearbox and bearings.
So how do I set the ratio? Cannot figure out your 4 and 1 versus <700/4000
How do I 'monitor' the PWM output, I have a small board built up as you have discribed earlier with optocoupler with input from IO26 and PNP/NPN transistors to set the voltage from 0-10V powered from the VFD.
When I now use the manual remote panel to the VFD I have no problems swithing forward/reverse on the go to speak, but I think it would be safer to have short pause.
Here is one thing I think we can take away and that is the M4 contactor to the motor as I now command via remote panel forward/reverse without switching M3/M4. This is obviously something from the past and I find it questionable if the old Siemens CNC system was using this method to switch direction but do not know for sure as I have not operated that system at all.
Sorry for the confusion, so if I am correct this can be done 2 ways: M3BIT 152
M4BIT 153
M3HIBIT 154
and only FORWARD bit 158
If I use this setup the FORWARD on remote panel acts as set by M3/M4
or
M3BIT 152
M3HIBIT 154
and FORWARD/REVERSE bits 158/159
If I use this setup remote panel forward and reverse does just that
Looking forward to you advise
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> That is good. Bits 158 and 158 should work. Yes the 700/4000 was used as the low high speed RPM values. Change them to correspond the the Max Low Speed and Max Hi Speed values for your system. You will also need to change the Factor value for the speed difference between High and Low Speeds.
> Â
> Do you know what limitations there are for switching directions and Hi/Low ranges? Will it cause any damage to switch them rapidly back and forth when we try to servo to a certain speed or position? If so we will have to build in some protections into the C Code. Maybe something like once we decide to switch directions or speeds we will prevent switching back for some amount of time.
> Â
> Regards
> TK
> Â
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, April 29, 2012 12:41 PM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
>
> Now I have the encoder working, axis #4 is counting up and down.
> Have the SpindleMach3PWMHiLoGear.c program working *** but I am missing the Foreward and Reverse commands to the VFD. What do you say about Bit158 and 159 for this purpose as they are free in my IO list.
>
> *** I can use M3 and M4 when controlling manually from the remote panel but I could not get HI to work. You have set some values to <700/4000 = what exactly does this do?
>
> So far so good
>
> Cheers
> Bengt
|
|
| Group: DynoMotion |
Message: 4699 |
From: Bengt Sjoelund |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
|
Uploaded VFD wireing PDF
Cheers
Bengt
|
|
| Group: DynoMotion |
Message: 4700 |
From: Tom Kerekes |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
I'm a bit confused on the Hi/Low Spindle control. The manual shows a total of 5 Inputs. Hi Med Low and Forward and Reverse. I'm guessing you are not using Med?
But as long as you can allow it to be controlled and explain it we should be able to adapt a C program to control it. I think your 2nd option is more straightforward. Maybe rename your signals to Hi, Low, Forward, Reverse instead of M3,M4 etc...
To test you can use the Digital IO screen to set the speed range and direction mode. Then use the example PWM1KHz.c to test setting PWM value.
Let's not worry about that spindle program I provided earlier as that is likely to change.
There is no way to read-back the PWM. To test you would need to place a voltmeter or oscilloscope on the output. I assume you have a capacitor to convert the PWM to an analog voltage? Because we will need the spindle to operate like a servo we will want a fairly quick response on the signal so we will want to optimize the PWM rate for the fastest frequency but without too much distortion through your opto couplers. Let's start with 1KHz.
Regards
TK
| Group: DynoMotion |
Message: 4701 |
From: Bengt Sjoelund |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
A bit confusing it is :)
The 3-phase motor is 2-speed = LO + HI = 1250rpm + 2500rpm (out of spindle with gearbox set to max rpm).
(no more reverse contactor as reverse can be commanded from VFD)
VFD will handle Forward and Reverse in either LO or HIGH with speed set by 0-10V PWM controlled with IO26.
LO = <700rpm max
HI = >700rpm min
152 LO rev
153 NOT USED!!! option
154 HiRev
158 VFD terminal STF Forward to VFD (M3)
159 VFD terminal STR Reverse to VFD (M4)
GND VFD terminal SD Common
I think we can agree on this?
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> I'm a bit confused on the Hi/Low Spindle control. The manual shows a total of 5 Inputs.  Hi Med Low and Forward and Reverse. I'm guessing you are not using Med?
> Â
> But as long as you can allow it to be controlled and explain it we should be able to adapt a C program to control it. I think your 2nd option is more straightforward. Maybe rename your signals to Hi, Low, Forward, Reverse instead of M3,M4 etc...
> Â
> To test you can use the Digital IO screen to set the speed range and direction mode. Then use the example PWM1KHz.c to test setting PWM value.
> Â
> Let's not worry about that spindle program I provided earlier as that is likely to change.
> Â
> There is no way to read-back the PWM. To test you would need to place a voltmeter or oscilloscope on the output. I assume you have a capacitor to convert the PWM to an analog voltage? Because we will need the spindle to operate like a servo we will want a fairly quick response on the signal so we will want to optimize the PWM rate for the fastest frequency but without too much distortion through your opto couplers. Let's start with 1KHz.
> Â
> Regards
> TK
> Â
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 30, 2012 3:48 AM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
>
> Will do the cabling now from JP8 /Bits 158/159.
> How are these set, activated in Mach3 or within the HiLo C file?
>
> I have uploaded a picture showing the spindel head gerabox, this is from the time before VFD when all rpm's where manually set. As you can see I have crossed over one manual setting so the lever is always in outer position as the encoder is mounted on that shaft. This was the easiest way to get 1:1. Also there is a manual gearing setting via A to E that will be more or less locked to A for max rpm's on HI/LO motor setting.
>
> LO max rpm is 1250 but I think that 700 rpm is a suitable max and let the HI take it from there to max 2500. This is where I want to start even if I can get more than 2500 via VFD but I think it is wise not to push the mechanical gearbox and bearings.
>
> So how do I set the ratio? Cannot figure out your 4 and 1 versus <700/4000
>
> How do I 'monitor' the PWM output, I have a small board built up as you have discribed earlier with optocoupler with input from IO26 and PNP/NPN transistors to set the voltage from 0-10V powered from the VFD.
>
> When I now use the manual remote panel to the VFD I have no problems swithing forward/reverse on the go to speak, but I think it would be safer to have short pause.
>
> Here is one thing I think we can take away and that is the M4 contactor to the motor as I now command via remote panel forward/reverse without switching M3/M4. This is obviously something from the past and I find it questionable if the old Siemens CNC system was using this method to switch direction but do not know for sure as I have not operated that system at all.
>
> Sorry for the confusion, so if I am correct this can be done 2 ways: M3BIT 152
> M4BIT 153
> M3HIBIT 154
> and only FORWARD bit 158
> If I use this setup the FORWARD on remote panel acts as set by M3/M4
>
> or
>
> M3BIT 152
> M3HIBIT 154
> and FORWARD/REVERSE bits 158/159
> If I use this setup remote panel forward and reverse does just that
>
> Looking forward to you advise
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> > ÃÂ
> > That is good.ÃÂ Bits 158 and 158 should work.ÃÂ Yes the 700/4000 was used as the low high speed RPM values.ÃÂ Change them to correspond the the Max Low Speed and Max Hi Speed values for your system.ÃÂ You will also need to change theÃÂ Factor value for the speed difference between High and Low Speeds.
> > ÃÂ
> > Do you know what limitations there are for switching directions and Hi/Low ranges?ÃÂ Will it cause any damage to switch them rapidly back and forth when we try to servo to a certain speed or position?ÃÂ If so we will have to build in some protections into the C Code.ÃÂ Maybe something like once we decide to switch directions or speeds we will prevent switching back for some amount of time.
> > ÃÂ
> > Regards
> > TK
> > ÃÂ
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, April 29, 2012 12:41 PM
> > Subject: [DynoMotion] Re: More I/O questions
> >
> >
> > ÃÂ
> > Hi Tom,
> >
> > Now I have the encoder working, axis #4 is counting up and down.
> > Have the SpindleMach3PWMHiLoGear.c program working *** but I am missing the Foreward and Reverse commands to the VFD. What do you say about Bit158 and 159 for this purpose as they are free in my IO list.
> >
> > *** I can use M3 and M4 when controlling manually from the remote panel but I could not get HI to work. You have set some values to <700/4000 = what exactly does this do?
> >
> > So far so good
> >
> > Cheers
> > Bengt
>
|
|
| Group: DynoMotion |
Message: 4702 |
From: TK |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
Hi Bengt,
Not sure why you labeled 152 Lo rev and 154 Hi rev? Shouldn't it be just Lo and Hi ?
TK On Apr 30, 2012, at 11:00 AM, "Bengt Sjoelund" <cnc@...> wrote:
Hi Tom,
A bit confusing it is :)
The 3-phase motor is 2-speed = LO + HI = 1250rpm + 2500rpm (out of spindle with gearbox set to max rpm).
(no more reverse contactor as reverse can be commanded from VFD)
VFD will handle Forward and Reverse in either LO or HIGH with speed set by 0-10V PWM controlled with IO26.
LO = <700rpm max
HI = >700rpm min
152 LO rev
153 NOT USED!!! option
154 HiRev
158 VFD terminal STF Forward to VFD (M3)
159 VFD terminal STR Reverse to VFD (M4)
GND VFD terminal SD Common
I think we can agree on this?
Cheers
Bengt
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
> Â
> I'm a bit confused on the Hi/Low Spindle control. The manual shows a total of 5 Inputs.  Hi Med Low and Forward and Reverse. I'm guessing you are not using Med?
> Â
> But as long as you can allow it to be controlled and explain it we should be able to adapt a C program to control it. I think your 2nd option is more straightforward. Maybe rename your signals to Hi, Low, Forward, Reverse instead of M3,M4 etc...
> Â
> To test you can use the Digital IO screen to set the speed range and direction mode. Then use the example PWM1KHz.c to test setting PWM value.
> Â
> Let's not worry about that spindle program I provided earlier as that is likely to change.
> Â
> There is no way to read-back the PWM. To test you would need to place a voltmeter or oscilloscope on the output. I assume you have a capacitor to convert the PWM to an analog voltage? Because we will need the spindle to operate like a servo we will want a fairly quick response on the signal so we will want to optimize the PWM rate for the fastest frequency but without too much distortion through your opto couplers. Let's start with 1KHz.
> Â
> Regards
> TK
> Â
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 30, 2012 3:48 AM
> Subject: [DynoMotion] Re: More I/O questions
>
>
> Â
> Hi Tom,
>
> Will do the cabling now from JP8 /Bits 158/159.
> How are these set, activated in Mach3 or within the HiLo C file?
>
> I have uploaded a picture showing the spindel head gerabox, this is from the time before VFD when all rpm's where manually set. As you can see I have crossed over one manual setting so the lever is always in outer position as the encoder is mounted on that shaft. This was the easiest way to get 1:1. Also there is a manual gearing setting via A to E that will be more or less locked to A for max rpm's on HI/LO motor setting.
>
> LO max rpm is 1250 but I think that 700 rpm is a suitable max and let the HI take it from there to max 2500. This is where I want to start even if I can get more than 2500 via VFD but I think it is wise not to push the mechanical gearbox and bearings.
>
> So how do I set the ratio? Cannot figure out your 4 and 1 versus <700/4000
>
> How do I 'monitor' the PWM output, I have a small board built up as you have discribed earlier with optocoupler with input from IO26 and PNP/NPN transistors to set the voltage from 0-10V powered from the VFD.
>
> When I now use the manual remote panel to the VFD I have no problems swithing forward/reverse on the go to speak, but I think it would be safer to have short pause.
>
> Here is one thing I think we can take away and that is the M4 contactor to the motor as I now command via remote panel forward/reverse without switching M3/M4. This is obviously something from the past and I find it questionable if the old Siemens CNC system was using this method to switch direction but do not know for sure as I have not operated that system at all.
>
> Sorry for the confusion, so if I am correct this can be done 2 ways: M3BIT 152
> M4BIT 153
> M3HIBIT 154
> and only FORWARD bit 158
> If I use this setup the FORWARD on remote panel acts as set by M3/M4
>
> or
>
> M3BIT 152
> M3HIBIT 154
> and FORWARD/REVERSE bits 158/159
> If I use this setup remote panel forward and reverse does just that
>
> Looking forward to you advise
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> > ÂÂ
> > That is good. Bits 158 and 158 should work. Yes the 700/4000 was used as the low high speed RPM values. Change them to correspond the the Max Low Speed and Max Hi Speed values for your system. You will also need to change the Factor value for the speed difference between High and Low Speeds.
> > ÂÂ
> > Do you know what limitations there are for switching directions and Hi/Low ranges? Will it cause any damage to switch them rapidly back and forth when we try to servo to a certain speed or position? If so we will have to build in some protections into the C Code. Maybe something like once we decide to switch directions or speeds we will prevent switching back for some amount of time.
> > ÂÂ
> > Regards
> > TK
> > ÂÂ
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, April 29, 2012 12:41 PM
> > Subject: [DynoMotion] Re: More I/O questions
> >
> >
> > ÂÂ
> > Hi Tom,
> >
> > Now I have the encoder working, axis #4 is counting up and down.
> > Have the SpindleMach3PWMHiLoGear.c program working *** but I am missing the Foreward and Reverse commands to the VFD. What do you say about Bit158 and 159 for this purpose as they are free in my IO list.
> >
> > *** I can use M3 and M4 when controlling manually from the remote panel but I could not get HI to work. You have set some values to <700/4000 = what exactly does this do?
> >
> > So far so good
> >
> > Cheers
> > Bengt
>
|
|
| Group: DynoMotion |
Message: 4703 |
From: Bengt Sjoelund |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
Hi Tom,
You are right, still not updated in my IO list. Later on this evening I will post the updated list
Bengt
--- In DynoMotion@yahoogroups.com, TK <tk@...> wrote:
>
> Hi Bengt,
>
> Not sure why you labeled 152 Lo rev and 154 Hi rev? Shouldn't it be just Lo and Hi ?
>
> TK
>
> On Apr 30, 2012, at 11:00 AM, "Bengt Sjoelund" <cnc@...> wrote:
>
> >
> > Hi Tom,
> > A bit confusing it is :)
> >
> > The 3-phase motor is 2-speed = LO + HI = 1250rpm + 2500rpm (out of spindle with gearbox set to max rpm).
> > (no more reverse contactor as reverse can be commanded from VFD)
> >
> > VFD will handle Forward and Reverse in either LO or HIGH with speed set by 0-10V PWM controlled with IO26.
> > LO = <700rpm max
> > HI = >700rpm min
> >
> > 152 LO rev
> > 153 NOT USED!!! option
> > 154 HiRev
> >
> > 158 VFD terminal STF Forward to VFD (M3)
> > 159 VFD terminal STR Reverse to VFD (M4)
> > GND VFD terminal SD Common
> >
> > I think we can agree on this?
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > > Ã
> > > I'm a bit confused on the Hi/Low Spindle control.Ã The manual shows a total of 5 Inputs.Ã Ã Hi Med Low and Forward and Reverse.Ã I'm guessing you are not using Med?
> > > Ã
> > > But as long as you can allow it to be controlled and explain it we should be able to adapt a C program to control it.Ã I think your 2nd option is more straightforward.Ã Maybe rename your signals to Hi, Low, Forward, Reverse instead of M3,M4 etc...
> > > Ã
> > > To test you can use the Digital IO screen to set the speed range and direction mode.à Then use the example PWM1KHz.c to test settingà PWM value.
> > > Ã
> > > Let's not worry about that spindle program I provided earlier as that is likely to change.
> > > Ã
> > > There is no way to read-back the PWM.Ã To test you would need to place a voltmeter or oscilloscope on the output.Ã I assume you have a capacitor to convert the PWM to an analog voltage?Ã Because we will need the spindle to operate like a servo we will want a fairly quick response on the signal so we will want to optimize the PWM rate for the fastest frequency but without too much distortion through your opto couplers.Ã Let's start with 1KHz.
> > > Ã
> > > Regards
> > > TK
> > > Ã
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 30, 2012 3:48 AM
> > > Subject: [DynoMotion] Re: More I/O questions
> > >
> > >
> > > Ã
> > > Hi Tom,
> > >
> > > Will do the cabling now from JP8 /Bits 158/159.
> > > How are these set, activated in Mach3 or within the HiLo C file?
> > >
> > > I have uploaded a picture showing the spindel head gerabox, this is from the time before VFD when all rpm's where manually set. As you can see I have crossed over one manual setting so the lever is always in outer position as the encoder is mounted on that shaft. This was the easiest way to get 1:1. Also there is a manual gearing setting via A to E that will be more or less locked to A for max rpm's on HI/LO motor setting.
> > >
> > > LO max rpm is 1250 but I think that 700 rpm is a suitable max and let the HI take it from there to max 2500. This is where I want to start even if I can get more than 2500 via VFD but I think it is wise not to push the mechanical gearbox and bearings.
> > >
> > > So how do I set the ratio? Cannot figure out your 4 and 1 versus <700/4000
> > >
> > > How do I 'monitor' the PWM output, I have a small board built up as you have discribed earlier with optocoupler with input from IO26 and PNP/NPN transistors to set the voltage from 0-10V powered from the VFD.
> > >
> > > When I now use the manual remote panel to the VFD I have no problems swithing forward/reverse on the go to speak, but I think it would be safer to have short pause.
> > >
> > > Here is one thing I think we can take away and that is the M4 contactor to the motor as I now command via remote panel forward/reverse without switching M3/M4. This is obviously something from the past and I find it questionable if the old Siemens CNC system was using this method to switch direction but do not know for sure as I have not operated that system at all.
> > >
> > > Sorry for the confusion, so if I am correct this can be done 2 ways: M3BIT 152
> > > M4BIT 153
> > > M3HIBIT 154
> > > and only FORWARD bit 158
> > > If I use this setup the FORWARD on remote panel acts as set by M3/M4
> > >
> > > or
> > >
> > > M3BIT 152
> > > M3HIBIT 154
> > > and FORWARD/REVERSE bits 158/159
> > > If I use this setup remote panel forward and reverse does just that
> > >
> > > Looking forward to you advise
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt,
> > > > ÃâÃ
> > > > That is good.Ãâà Bits 158 and 158 should work.Ãâà Yes the 700/4000 was used as the low high speed RPM values.Ãâà Change them to correspond the the Max Low Speed and Max Hi Speed values for your system.Ãâà You will also need to change theÃâà Factor value for the speed difference between High and Low Speeds.
> > > > ÃâÃ
> > > > Do you know what limitations there are for switching directions and Hi/Low ranges?Ãâà Will it cause any damage to switch them rapidly back and forth when we try to servo to a certain speed or position?Ãâà If so we will have to build in some protections into the C Code.Ãâà Maybe something like once we decide to switch directions or speeds we will prevent switching back for some amount of time.
> > > > ÃâÃ
> > > > Regards
> > > > TK
> > > > ÃâÃ
> > > >
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Sunday, April 29, 2012 12:41 PM
> > > > Subject: [DynoMotion] Re: More I/O questions
> > > >
> > > >
> > > > ÃâÃ
> > > > Hi Tom,
> > > >
> > > > Now I have the encoder working, axis #4 is counting up and down.
> > > > Have the SpindleMach3PWMHiLoGear.c program working *** but I am missing the Foreward and Reverse commands to the VFD. What do you say about Bit158 and 159 for this purpose as they are free in my IO list.
> > > >
> > > > *** I can use M3 and M4 when controlling manually from the remote panel but I could not get HI to work. You have set some values to <700/4000 = what exactly does this do?
> > > >
> > > > So far so good
> > > >
> > > > Cheers
> > > > Bengt
> > >
> >
> >
>
|
|
| Group: DynoMotion |
Message: 4704 |
From: Bengt Sjoelund |
Date: 4/30/2012 |
| Subject: Re: More I/O questions |
| | | | | | | | | | | |